package com.kkwrite.regimen.provider.service.shop;

import com.kkwrite.regimen.common.entity.dto.shop.EditShopInDTO;
import com.kkwrite.regimen.common.entity.dto.shop.EditShopOutDTO;
import com.kkwrite.regimen.common.entity.dto.shop.InsertShopEmployeeInDTO;
import com.kkwrite.regimen.common.entity.dto.shop.InsertShopEmployeeOutDTO;
import com.kkwrite.regimen.common.entity.dto.shop.InsertShopOutDTO;
import com.kkwrite.regimen.common.entity.dto.shop.PageableItemDTO;
import com.kkwrite.regimen.common.entity.dto.shop.PageableShopIncomeDTO;
import com.kkwrite.regimen.common.entity.dto.shop.ShopDetailDTO;
import com.kkwrite.regimen.common.entity.dto.shop.ShopIncomeCountDTO;
import com.kkwrite.regimen.common.entity.dto.user.PageableUserDTO;
import com.kkwrite.regimen.provider.exception.DBNullException;
import com.kkwrite.regimen.provider.exception.ServiceException;

/**
 * 店铺服务
 *
 * @author Soosky Wang
 * @date 2018年7月21日 上午9:56:00
 * @version 1.0.0
 */

/**
 * @author JY
 *
 */
public interface ShopService {

    /**
     * 根据 shopId 查询店铺详情
     * @param shopId
     * @return
     * @throws ServiceException
     */
    ShopDetailDTO getShopDetail(Long shopId) throws ServiceException;


    /**
     * 店铺项目列表分页接口
     * @param page 页码
     * @param size 每页大小
     * @param shopId 店铺Id
     * @param sortType 排序类型
     * @return PageableItemDTO
     * @throws NumberFormatException 异常
     * @throws ServiceException 异常
     */
    PageableItemDTO queryItemByShopId(Integer page, Integer size, Long shopId, Integer sortType) throws NumberFormatException, ServiceException;

    /**
     * 查询店铺收益总数
     *
     */
    ShopIncomeCountDTO queryShopIncomeByShopId(Long shopId) throws ServiceException;

    /**
     * 根据inviterId查询邀请人明细
     * @param inviterId inviterId
     * @return user info
     */
    PageableUserDTO queryUserByInviterIdShop(Integer page, Integer size, Long shopId, Integer sortType);

    /**
     * 分页查询店铺收益明细
     * @param page 页码
     * @param size 每页大小
     * @param shopId 店铺ID
     * @param sortType 排序类型
     * @return PageableIncomeDTO
     * @throws NumberFormatException 异常
     * @throws ServiceException 异常
     */
    PageableShopIncomeDTO queryShopIncome(Integer page, Integer size, Long shopId, Integer sortType) throws NumberFormatException, ServiceException;

    /**
     * 编辑商铺信息
     * @param editShopInDto 编辑入参内容
     * 
     * */
    EditShopOutDTO editShop(EditShopInDTO editShopInDto);
    
    /**
     * 编辑商铺信息
     * @param editShopInDto 编辑入参内容
     * 
     * */
    InsertShopOutDTO insertShop(EditShopInDTO editShopInDto);

    /**
     * 查询店铺邀请二维码访问链接
     * @param shopId 店铺id字符串
     * @return 二维码链接
     * @throws DBNullException 店铺不存在
     */
    String queryQrcodePath(String shopId) throws DBNullException;

    /**
     * 保存店铺分享二维码链接
     * @param accessQrcodePath 分享二维码链接
     * @param shopId 店铺ID
     * @throws DBNullException 店铺不存在
     */
    void saveQrcodePath(String accessQrcodePath, String shopId) throws DBNullException;
    
    /**
     * 新增店铺账号
     * @param inDto 新增店铺账号入参
     * @throws DBNullException 店铺不存在
     */
    InsertShopEmployeeOutDTO saveShopEmployee(InsertShopEmployeeInDTO inDto);
    
    
}
